﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TuiKuanQR.aspx.cs" Inherits="Web.Pages.QuShui._6.ZhangWuGL.TuiKuanQR" Theme="Default" ValidateRequest="false" %>

<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../../../JS/AddEditCancel.js"></script>
    <script type="text/javascript">

        function conditionKeyUp() {
            if (txtYongHuH.GetText() != "" && txtYongHuH.GetText().length != 7) {
                alert('用户号应为7位。');
                return;
            }
            if (txtYM.GetText() != "" && txtYM.GetText().length != 6) {
                alert('请输入正确的水量年月。');
                return;
            }
            btnActPerform.onClick();
        }
        //异步回调接收事件
        function ASPxCallbackCommonComplete(rs) {
            var arr = rs.split('|');
            var type = arr[0];
            var state = arr[1];
            alert(arr[2]);
            if (state == "0") {
                btnActPerform.onClick();
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>       
        <div class="tabletitle1" align="center">
            退款确认
        </div>
        <asp:UpdatePanel ID="updatePanel1" runat="server">
            <ContentTemplate>
                 <div style="display: none;">
            <dx:ASPxButton ID="btnActPerform" ClientInstanceName="btnActPerform" runat="server" Text="ASPxButton" OnClick="btnActPerform_Click"></dx:ASPxButton>
        </div>
        <dx:ASPxHiddenField ID="hdCollection" ClientInstanceName="hdCollection" runat="server"></dx:ASPxHiddenField>
        <dx:ASPxCallback ID="ASPxCallback1" ClientInstanceName="ASPxCallback1" runat="server" OnCallback="ASPxCallback1_Callback" ClientSideEvents-CallbackComplete="function(s,e){ASPxCallbackCommonComplete(e.result);}"></dx:ASPxCallback>
                <div>
                    <div>
                        <table style="width: 100%; text-align: right;">
                            <tr>
                                <td style="width: 6%;"><span style="font-size: 12px; white-space: nowrap">用户号：</span></td>
                                <td style="width: 10%;">
                                    <dx:ASPxTextBox ID="txtYongHuH" ClientInstanceName="txtYongHuH" Width="100%" runat="server" Enabled="true" ClientSideEvents-KeyUp="function(s,e){inputNum(s);if (event.keyCode == 13) {conditionKeyUp();}}">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 6%;"><span style="font-size: 12px; white-space: nowrap">用户名：</span></td>
                                <td style="width: 15%;">
                                    <dx:ASPxTextBox ID="txtYongHuM" Width="100%" runat="server" Enabled="true" ClientSideEvents-KeyPress="function(s,e){if (event.keyCode == 13) {conditionKeyUp();}}">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 8%;"><span style="font-size: 12px; white-space: nowrap">水量年月：</span></td>
                                <td style="width: 7%;">
                                    <dx:ASPxTextBox ID="txtYM" ClientInstanceName="txtYM" Width="100%" runat="server" Enabled="true" ClientSideEvents-KeyUp="function(s,e){inputNum(s);if (event.keyCode == 13) {conditionKeyUp();}}">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 8%;">
                                    <span style="font-size: 12px; white-space: nowrap">退款类型：</span>
                                </td>
                                <td style="width: 11%;">
                                    <asp:Panel runat="server" ID="Panel1">
                                        <dx:ASPxComboBox runat="server" ID="cmbTuiKuanLX" Width="100%">
                                        </dx:ASPxComboBox>
                                    </asp:Panel>
                                </td>
                                <td style="width: 8%;">
                                    <span style="font-size: 12px; white-space: nowrap">来函编号：</span>
                                </td>
                                <td style="width: 12%;">
                                    <dx:ASPxTextBox ID="txtLaiHanBH" Width="100%" runat="server" Enabled="true" ClientSideEvents-KeyPress="function(s,e){if (event.keyCode == 13) {conditionKeyUp();}}">
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="text-align: left;">
                                    <dx:ASPxButton ID="btnCanXun" runat="server" Text="查询" AutoPostBack="false" UseSubmitBehavior="false" ClientSideEvents-Click="function(s,e){conditionKeyUp();}">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </div>
                    <div>
                        <dx:ASPxGridView ID="gvList" runat="server" AutoGenerateColumns="False" EnableCallBacks="false" KeyFieldName="ID" Theme="Aqua1" Width="100%">
                            <Columns>
                                <dx:GridViewDataTextColumn Caption="" Width="6%" CellStyle-HorizontalAlign="Center">
                                    <DataItemTemplate>
                                        <dx:ASPxCheckBox ID="cid" runat="server"></dx:ASPxCheckBox>
                                        <asp:HiddenField ID="hfLaiHanBH" runat="server" Value='<%#Eval("S_LAIHANBH") %>' />
                                    </DataItemTemplate>
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户号" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="20%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="I_YM" Caption="水量年月" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_TKTYPE" Caption="退款类型" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="N_TKJE" Caption="退款金额" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_FEETYPE" Caption="费用类型" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_LAIHANBH" Caption="来函编号" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_CAOZUOR" Caption="操作员" Width="8%">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="D_CAOZUOSJ" Caption="操作日期" Width="10%" PropertiesTextEdit-DisplayFormatString="yyyy-MM-dd HH:mm">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="S_QUERENZT" Caption="状态" Width="8%">
                                </dx:GridViewDataTextColumn>
                            </Columns>
                            <Settings VerticalScrollableHeight="450" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                            <SettingsBehavior AllowSort="false" />
                        </dx:ASPxGridView>
                    </div>
                    <div>
                        <table align="right">
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="btnQuXiao" runat="server" Text="取消退款" UseSubmitBehavior="false" AutoPostBack="false" ClientSideEvents-Click="function(s,e){ASPxCallback1.PerformCallback('quxiao');}">
                                    </dx:ASPxButton>
                                </td>
                                <td>
                                    <dx:ASPxButton ID="btnQueRen" runat="server" Text="确认" UseSubmitBehavior="false" AutoPostBack="false" ClientSideEvents-Click="function(s,e){ASPxCallback1.PerformCallback('queren');}">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
